# Convert MSVC runtime library string to MSVC flag and append to var_name
function(msvc_runtime_library_to_msvc_flags var_name runtime_library)
    if (runtime_library STREQUAL "MultiThreaded")
        set("${var_name}" ${${var_name}} /MT PARENT_SCOPE)
    elseif (runtime_library STREQUAL "MultiThreadedDLL")
        set("${var_name}" ${${var_name}} /MD PARENT_SCOPE)
    elseif(runtime_library STREQUAL "MultiThreadedDebug")
        set("${var_name}" ${${var_name}} /MTd PARENT_SCOPE)
    elseif(runtime_library STREQUAL "MultiThreadedDebugDLL")
        set("${var_name}" ${${var_name}} /MDd PARENT_SCOPE)
    else ()
        show_fatal_error("Unknown MSVC runtime library: '${runtime_library}'")
    endif ()
endfunction()